package com.sasis.model;
// Generated 2007-7-30 17:05:55 by Hibernate Tools 3.1.0.beta4

import java.sql.Date;


/**
 * @struts.form include-all="true" extends="BaseForm"
 * @hibernate.class
 *         table="FLIGHT"
 *     
 */

public class Flight extends com.sasis.model.BaseObject implements java.io.Serializable {


    // Fields    

    private Integer id;
    private String flightNum;
    private String flightDate;
    private String fromPort;
    private String toPort;
    private Date planningDepartTime;
    private Date expectedDepartTime;
    private Date doorCloseTime;
    private Date actualDepartTime;
    private Date planningArrivalTime;
    private Date expectedArrivalTime;
    private Date actualArrivalTime;
    private Date doorOpenTime;
    private Integer isDelayed;
    private Integer isCanceled;
    private String planeModel;
    private String planeNumber;
    private String captain;


    // Constructors

    /** default constructor */
    public Flight() {
    }

    
    /** full constructor */
    public Flight(String flightNum, String flightDate, String fromPort, String toPort, Date planningDepartTime, Date expectedDepartTime, Date doorCloseTime, Date actualDepartTime, Date planningArrivalTime, Date expectedArrivalTime, Date actualArrivalTime, Date doorOpenTime, Integer isDelayed, Integer isCanceled, String planeModel, String planeNumber, String captain) {
        this.flightNum = flightNum;
        this.flightDate = flightDate;
        this.fromPort = fromPort;
        this.toPort = toPort;
        this.planningDepartTime = planningDepartTime;
        this.expectedDepartTime = expectedDepartTime;
        this.doorCloseTime = doorCloseTime;
        this.actualDepartTime = actualDepartTime;
        this.planningArrivalTime = planningArrivalTime;
        this.expectedArrivalTime = expectedArrivalTime;
        this.actualArrivalTime = actualArrivalTime;
        this.doorOpenTime = doorOpenTime;
        this.isDelayed = isDelayed;
        this.isCanceled = isCanceled;
        this.planeModel = planeModel;
        this.planeNumber = planeNumber;
        this.captain = captain;
    }
    

   
    // Property accessors
    /**       
     *      *            @hibernate.id
     *             generator-class="native"
     *             type="java.lang.Integer"
     *             column="ID"
     *         
     */

    public Integer getId() {
        return this.id;
    }
    
    public void setId(Integer id) {
        this.id = id;
    }
    /**       
     *      *            @hibernate.property
     *             column="FLIGHT_NUM"
     *             length="8"
     *         
     */

    public String getFlightNum() {
        return this.flightNum;
    }
    
    public void setFlightNum(String flightNum) {
        this.flightNum = flightNum;
    }
    /**       
     *      *            @hibernate.property
     *             column="FLIGHT_DATE"
     *             length="7"
     *         
     */

    public String getFlightDate() {
        return this.flightDate;
    }
    
    public void setFlightDate(String flightDate) {
        this.flightDate = flightDate;
    }
    /**       
     *      *            @hibernate.property
     *             column="FROM_PORT"
     *             length="8"
     *         
     */

    public String getFromPort() {
        return this.fromPort;
    }
    
    public void setFromPort(String fromPort) {
        this.fromPort = fromPort;
    }
    /**       
     *      *            @hibernate.property
     *             column="TO_PORT"
     *             length="8"
     *         
     */

    public String getToPort() {
        return this.toPort;
    }
    
    public void setToPort(String toPort) {
        this.toPort = toPort;
    }
    /**       
     *      *            @hibernate.property
     *             column="PLANNING_DEPART_TIME"
     *             length="7"
     *         
     */

    public Date getPlanningDepartTime() {
        return this.planningDepartTime;
    }
    
    public void setPlanningDepartTime(Date planningDepartTime) {
        this.planningDepartTime = planningDepartTime;
    }
    /**       
     *      *            @hibernate.property
     *             column="EXPECTED_DEPART_TIME"
     *             length="7"
     *         
     */

    public Date getExpectedDepartTime() {
        return this.expectedDepartTime;
    }
    
    public void setExpectedDepartTime(Date expectedDepartTime) {
        this.expectedDepartTime = expectedDepartTime;
    }
    /**       
     *      *            @hibernate.property
     *             column="DOOR_CLOSE_TIME"
     *             length="7"
     *         
     */

    public Date getDoorCloseTime() {
        return this.doorCloseTime;
    }
    
    public void setDoorCloseTime(Date doorCloseTime) {
        this.doorCloseTime = doorCloseTime;
    }
    /**       
     *      *            @hibernate.property
     *             column="ACTUAL_DEPART_TIME"
     *             length="7"
     *         
     */

    public Date getActualDepartTime() {
        return this.actualDepartTime;
    }
    
    public void setActualDepartTime(Date actualDepartTime) {
        this.actualDepartTime = actualDepartTime;
    }
    /**       
     *      *            @hibernate.property
     *             column="PLANNING_ARRIVAL_TIME"
     *             length="7"
     *         
     */

    public Date getPlanningArrivalTime() {
        return this.planningArrivalTime;
    }
    
    public void setPlanningArrivalTime(Date planningArrivalTime) {
        this.planningArrivalTime = planningArrivalTime;
    }
    /**       
     *      *            @hibernate.property
     *             column="EXPECTED_ARRIVAL_TIME"
     *             length="7"
     *         
     */

    public Date getExpectedArrivalTime() {
        return this.expectedArrivalTime;
    }
    
    public void setExpectedArrivalTime(Date expectedArrivalTime) {
        this.expectedArrivalTime = expectedArrivalTime;
    }
    /**       
     *      *            @hibernate.property
     *             column="ACTUAL_ARRIVAL_TIME"
     *             length="7"
     *         
     */

    public Date getActualArrivalTime() {
        return this.actualArrivalTime;
    }
    
    public void setActualArrivalTime(Date actualArrivalTime) {
        this.actualArrivalTime = actualArrivalTime;
    }
    /**       
     *      *            @hibernate.property
     *             column="DOOR_OPEN_TIME"
     *             length="7"
     *         
     */

    public Date getDoorOpenTime() {
        return this.doorOpenTime;
    }
    
    public void setDoorOpenTime(Date doorOpenTime) {
        this.doorOpenTime = doorOpenTime;
    }
    /**       
     *      *            @hibernate.property
     *             column="IS_DELAYED"
     *             length="1"
     *         
     */

    public Integer getIsDelayed() {
        return this.isDelayed;
    }
    
    public void setIsDelayed(Integer isDelayed) {
        this.isDelayed = isDelayed;
    }
    /**       
     *      *            @hibernate.property
     *             column="IS_CANCELED"
     *             length="1"
     *         
     */

    public Integer getIsCanceled() {
        return this.isCanceled;
    }
    
    public void setIsCanceled(Integer isCanceled) {
        this.isCanceled = isCanceled;
    }
    /**       
     *      *            @hibernate.property
     *             column="PLANE_MODEL"
     *             length="8"
     *         
     */

    public String getPlaneModel() {
        return this.planeModel;
    }
    
    public void setPlaneModel(String planeModel) {
        this.planeModel = planeModel;
    }
    /**       
     *      *            @hibernate.property
     *             column="PLANE_NUMBER"
     *             length="8"
     *         
     */

    public String getPlaneNumber() {
        return this.planeNumber;
    }
    
    public void setPlaneNumber(String planeNumber) {
        this.planeNumber = planeNumber;
    }
    /**       
     *      *            @hibernate.property
     *             column="CAPTAIN"
     *             length="64"
     *         
     */

    public String getCaptain() {
        return this.captain;
    }
    
    public void setCaptain(String captain) {
        this.captain = captain;
    }
   

    /**
     * toString
     * @return String
     */
     public String toString() {
	  StringBuffer buffer = new StringBuffer();

      buffer.append(getClass().getName()).append("@").append(Integer.toHexString(hashCode())).append(" [");
      buffer.append("flightNum").append("='").append(getFlightNum()).append("' ");			
      buffer.append("flightDate").append("='").append(getFlightDate()).append("' ");			
      buffer.append("fromPort").append("='").append(getFromPort()).append("' ");			
      buffer.append("toPort").append("='").append(getToPort()).append("' ");			
      buffer.append("planningDepartTime").append("='").append(getPlanningDepartTime()).append("' ");			
      buffer.append("expectedDepartTime").append("='").append(getExpectedDepartTime()).append("' ");			
      buffer.append("doorCloseTime").append("='").append(getDoorCloseTime()).append("' ");			
      buffer.append("actualDepartTime").append("='").append(getActualDepartTime()).append("' ");			
      buffer.append("planningArrivalTime").append("='").append(getPlanningArrivalTime()).append("' ");			
      buffer.append("expectedArrivalTime").append("='").append(getExpectedArrivalTime()).append("' ");			
      buffer.append("actualArrivalTime").append("='").append(getActualArrivalTime()).append("' ");			
      buffer.append("doorOpenTime").append("='").append(getDoorOpenTime()).append("' ");			
      buffer.append("isDelayed").append("='").append(getIsDelayed()).append("' ");			
      buffer.append("isCanceled").append("='").append(getIsCanceled()).append("' ");			
      buffer.append("planeModel").append("='").append(getPlaneModel()).append("' ");			
      buffer.append("planeNumber").append("='").append(getPlaneNumber()).append("' ");			
      buffer.append("captain").append("='").append(getCaptain()).append("' ");			
      buffer.append("]");
      
      return buffer.toString();
     }


   public boolean equals(Object other) {
         if ( (this == other ) ) return true;
		 if ( (other == null ) ) return false;
		 if ( !(other instanceof Flight) ) return false;
		 Flight castOther = ( Flight ) other; 
         
		 return ( (this.getId()==castOther.getId()) || ( this.getId()!=null && castOther.getId()!=null && this.getId().equals(castOther.getId()) ) )
 && ( (this.getFlightNum()==castOther.getFlightNum()) || ( this.getFlightNum()!=null && castOther.getFlightNum()!=null && this.getFlightNum().equals(castOther.getFlightNum()) ) )
 && ( (this.getFlightDate()==castOther.getFlightDate()) || ( this.getFlightDate()!=null && castOther.getFlightDate()!=null && this.getFlightDate().equals(castOther.getFlightDate()) ) )
 && ( (this.getFromPort()==castOther.getFromPort()) || ( this.getFromPort()!=null && castOther.getFromPort()!=null && this.getFromPort().equals(castOther.getFromPort()) ) )
 && ( (this.getToPort()==castOther.getToPort()) || ( this.getToPort()!=null && castOther.getToPort()!=null && this.getToPort().equals(castOther.getToPort()) ) )
 && ( (this.getPlanningDepartTime()==castOther.getPlanningDepartTime()) || ( this.getPlanningDepartTime()!=null && castOther.getPlanningDepartTime()!=null && this.getPlanningDepartTime().equals(castOther.getPlanningDepartTime()) ) )
 && ( (this.getExpectedDepartTime()==castOther.getExpectedDepartTime()) || ( this.getExpectedDepartTime()!=null && castOther.getExpectedDepartTime()!=null && this.getExpectedDepartTime().equals(castOther.getExpectedDepartTime()) ) )
 && ( (this.getDoorCloseTime()==castOther.getDoorCloseTime()) || ( this.getDoorCloseTime()!=null && castOther.getDoorCloseTime()!=null && this.getDoorCloseTime().equals(castOther.getDoorCloseTime()) ) )
 && ( (this.getActualDepartTime()==castOther.getActualDepartTime()) || ( this.getActualDepartTime()!=null && castOther.getActualDepartTime()!=null && this.getActualDepartTime().equals(castOther.getActualDepartTime()) ) )
 && ( (this.getPlanningArrivalTime()==castOther.getPlanningArrivalTime()) || ( this.getPlanningArrivalTime()!=null && castOther.getPlanningArrivalTime()!=null && this.getPlanningArrivalTime().equals(castOther.getPlanningArrivalTime()) ) )
 && ( (this.getExpectedArrivalTime()==castOther.getExpectedArrivalTime()) || ( this.getExpectedArrivalTime()!=null && castOther.getExpectedArrivalTime()!=null && this.getExpectedArrivalTime().equals(castOther.getExpectedArrivalTime()) ) )
 && ( (this.getActualArrivalTime()==castOther.getActualArrivalTime()) || ( this.getActualArrivalTime()!=null && castOther.getActualArrivalTime()!=null && this.getActualArrivalTime().equals(castOther.getActualArrivalTime()) ) )
 && ( (this.getDoorOpenTime()==castOther.getDoorOpenTime()) || ( this.getDoorOpenTime()!=null && castOther.getDoorOpenTime()!=null && this.getDoorOpenTime().equals(castOther.getDoorOpenTime()) ) )
 && ( (this.getIsDelayed()==castOther.getIsDelayed()) || ( this.getIsDelayed()!=null && castOther.getIsDelayed()!=null && this.getIsDelayed().equals(castOther.getIsDelayed()) ) )
 && ( (this.getIsCanceled()==castOther.getIsCanceled()) || ( this.getIsCanceled()!=null && castOther.getIsCanceled()!=null && this.getIsCanceled().equals(castOther.getIsCanceled()) ) )
 && ( (this.getPlaneModel()==castOther.getPlaneModel()) || ( this.getPlaneModel()!=null && castOther.getPlaneModel()!=null && this.getPlaneModel().equals(castOther.getPlaneModel()) ) )
 && ( (this.getPlaneNumber()==castOther.getPlaneNumber()) || ( this.getPlaneNumber()!=null && castOther.getPlaneNumber()!=null && this.getPlaneNumber().equals(castOther.getPlaneNumber()) ) )
 && ( (this.getCaptain()==castOther.getCaptain()) || ( this.getCaptain()!=null && castOther.getCaptain()!=null && this.getCaptain().equals(castOther.getCaptain()) ) );
   }
   
   public int hashCode() {
         int result = 17;
         
         result = 37 * result + ( getId() == null ? 0 : this.getId().hashCode() );
         result = 37 * result + ( getFlightNum() == null ? 0 : this.getFlightNum().hashCode() );
         result = 37 * result + ( getFlightDate() == null ? 0 : this.getFlightDate().hashCode() );
         result = 37 * result + ( getFromPort() == null ? 0 : this.getFromPort().hashCode() );
         result = 37 * result + ( getToPort() == null ? 0 : this.getToPort().hashCode() );
         result = 37 * result + ( getPlanningDepartTime() == null ? 0 : this.getPlanningDepartTime().hashCode() );
         result = 37 * result + ( getExpectedDepartTime() == null ? 0 : this.getExpectedDepartTime().hashCode() );
         result = 37 * result + ( getDoorCloseTime() == null ? 0 : this.getDoorCloseTime().hashCode() );
         result = 37 * result + ( getActualDepartTime() == null ? 0 : this.getActualDepartTime().hashCode() );
         result = 37 * result + ( getPlanningArrivalTime() == null ? 0 : this.getPlanningArrivalTime().hashCode() );
         result = 37 * result + ( getExpectedArrivalTime() == null ? 0 : this.getExpectedArrivalTime().hashCode() );
         result = 37 * result + ( getActualArrivalTime() == null ? 0 : this.getActualArrivalTime().hashCode() );
         result = 37 * result + ( getDoorOpenTime() == null ? 0 : this.getDoorOpenTime().hashCode() );
         result = 37 * result + ( getIsDelayed() == null ? 0 : this.getIsDelayed().hashCode() );
         result = 37 * result + ( getIsCanceled() == null ? 0 : this.getIsCanceled().hashCode() );
         result = 37 * result + ( getPlaneModel() == null ? 0 : this.getPlaneModel().hashCode() );
         result = 37 * result + ( getPlaneNumber() == null ? 0 : this.getPlaneNumber().hashCode() );
         result = 37 * result + ( getCaptain() == null ? 0 : this.getCaptain().hashCode() );
         return result;
   }   





}
